package com.bnyy.gbp;

import java.util.regex.Pattern;

public class MatchUtils {

    public static boolean matchIdCardNumber(String IdCardNumber) {

        String id_18="^[1-9][0-9]{5}(18|19|20)[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}([0-9]|(X|x))";

        Pattern pattern = Pattern.compile(id_18);

        return pattern.matcher(IdCardNumber).matches();
    }
}
